#ifndef COLORLABEL_H
#define COLORLABEL_H

#include <QObject>
#include <QImage>
#include <QRgb>
#include <QPainter>
#include <QPaintEvent>
#include <QLabel>
#include <QPixmap>
class ColorLabel : public QLabel
{
    Q_OBJECT
public:
    explicit ColorLabel(QWidget *parent = 0);
private:
    QImage *image;
signals:

public slots:
protected:
    void paintEvent(QPaintEvent *)
    {
        QPainter p(this);
        p.drawPixmap(0,0,this->width(),this->height(),QPixmap::fromImage(*image).scaled(this->width(),this->height()));
    }
};

#endif // COLORLABEL_H
